﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
        <tr>
        <td>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:CheckBox ID="CheckBox1" runat="server" />
            </td><td>
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="ObjectDataSource1" KeyFieldName="Id">
                    <Columns>
                        <dx:GridViewCommandColumn VisibleIndex="0">
                            <EditButton Visible="True">
                            </EditButton>
                            <NewButton Visible="True">
                            </NewButton>
                            <DeleteButton Visible="True">
                            </DeleteButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn FieldName="NoteContent" VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataCheckColumn FieldName="Status" VisibleIndex="2">
                        </dx:GridViewDataCheckColumn>
                        <dx:GridViewDataTextColumn FieldName="Id" VisibleIndex="3">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn FieldName="CreatedDate" VisibleIndex="4">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataDateColumn FieldName="ModifiedDate" VisibleIndex="5">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataCheckColumn FieldName="IsNew" ReadOnly="True" VisibleIndex="6">
                        </dx:GridViewDataCheckColumn>
                        <dx:GridViewDataTextColumn FieldName="ChildsTable" Visible="False" 
                            VisibleIndex="6">
                            <EditFormSettings Visible="True" />
                            <EditItemTemplate>
                                
                                <dx:ASPxGridView ID="ASPxGridView2" runat="server" 
                                    DataSource='<%# Bind("ChildsTable") %>' >
                                </dx:ASPxGridView>
                            </EditItemTemplate>
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Settings ShowFilterRow="True" />
                </dx:ASPxGridView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    DataObjectTypeName="NHTools.Entity.FirstTable" DeleteMethod="Delete" 
                    InsertMethod="Save" SelectMethod="GetAll" TypeName="NHTools.Entity.FirstTable" 
                    UpdateMethod="Update"></asp:ObjectDataSource>
            </td>
        </tr>        
    </table>
    
    </div>
    </form>
</body>
</html>
